3D reconstruction with smooth maps

ABSTRACT

A computer-implemented method for 3D reconstruction including obtaining 2D images and, for each 2D image, camera parameters which define a perspective projection. The 2D images all represent a same real object. The real object is fixed. The method also includes obtaining, for each 2D image, a smooth map. The smooth map has pixel values, and each pixel value represents a measurement of contour presence. The method also includes determining a 3D modeled object that represents the real object. The determining iteratively optimizes energy. The energy rewards, for each smooth map, projections of silhouette vertices of the 3D modeled object having pixel values representing a high measurement of contour presence. This forms an improved solution for 3D reconstruction.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority under 35 U.S.C. § 119 or 365 toEuropean Application No. 193067964, filed Dec. 31, 2019. The entirecontents of the above application(s) are incorporated herein byreference.

FIELD

The disclosure relates to the field of computer programs and systems,and more specifically to a method, system and program for 3Dreconstruction.

BACKGROUND

A number of systems and programs are offered on the market for thedesign, the engineering and the manufacturing of objects. CAD is anacronym for Computer-Aided Design, e.g. it relates to software solutionsfor designing an object. CAE is an acronym for Computer-AidedEngineering, e.g. it relates to software solutions for simulating thephysical behavior of a future product. CAM is an acronym forComputer-Aided Manufacturing, e.g. It relates to software solutions fordefining manufacturing processes and operations. In such computer-aideddesign systems, the graphical user interface plays an important role asregards the efficiency of the technique. These techniques may beembedded within Product Lifecycle Management (PLM) systems. PLM refersto a business strategy that helps companies to share product data, applycommon processes, and leverage corporate knowledge for the developmentof products from conception to the end of their life, across the conceptof extended enterprise. The PLM solutions provided by Dassault Systèmes(under the trademarks CATIA, ENOVIA and DELMIA) provide an EngineeringHub, which organizes product engineering knowledge, a Manufacturing Hub,which manages manufacturing engineering knowledge, and an Enterprise Hubwhich enables enterprise integrations and connections into both theEngineering and Manufacturing Hubs. All together the system delivers anopen object model linking products, processes, resources to enabledynamic, knowledge-based product creation and decision support thatdrives optimized product definition, manufacturing preparation,production and service.

In this context and other contexts, 3D reconstruction is gaining wideimportance. 3D reconstruction pertains to computer vision techniquesthat allow determining 3D modeled objects based on data representingreal objects or real scenes. Such techniques may be useful to fieldssuch as virtual and augmented reality (more generally, any kind ofimmersive experience), video games, manufacturing and 3D printing,and/or 3D modeling.

While much research effort has been made in this field in the pastyears, there is still a need for an improved solution for 3Dreconstruction.

SUMMARY

It is therefore provided a computer-implemented method for 3Dreconstruction. The method comprises providing 2D images and, for each2D image, camera parameters which define a perspective projection. The2D images all represent a same real object. The real object is fixed.The method also comprises providing, for each 2D image, a smooth map.The smooth map has pixel values, and each pixel value represents ameasurement of contour presence. The method also comprises determining a3D modeled object that represents the real object. The determiningiteratively optimizes energy. The energy rewards, for each smooth map,projections of silhouette vertices of the 3D modeled object having pixelvalues representing a high measurement of contour presence.

The method may comprise one or more of the following:

-   -   the smooth map comprises local extrema corresponding to contour        probability maxima, the energy rewarding high contour        probability at the projections of the silhouette vertices;    -   the smooth map is a function of a contour probability map;    -   the function is a smoothing of an affine mapping;    -   the smoothing comprises at least one application of a Gaussian        blur to the contour probability map, or a convolution of the        contour probability map with a kernel obtained from a Laplace        distribution;    -   the smoothing comprises determining an envelope of application        of a family of Gaussian blurs to the contour probability map,        each Gaussian blur having a different kernel size;    -   the energy comprises a term of the type        E_(fit)=Σ_(i,j)E_(i)(π_(i)(s_(ij)))² where, for a 2D image i,        E_(i)(⋅) denotes the smooth map, s_(ij) denotes a silhouette        point j, and π_(i)(⋅) denotes a projection transformation;    -   the 3D modeled object is a control mesh of a subdivision        surface;    -   the method further comprises, at each iteration of the        optimizing:        -   providing a current control mesh;        -   subdividing the current control mesh into a subdivided mesh;        -   for each 2D image:            -   projecting the subdivided mesh on the 2D image;            -   computing a 2D silhouette of the 3D modeled object in                the 2D image; and            -   identifying points of the subdivided mesh corresponding                to the 2D silhouette, as the silhouette vertices; and        -   modifying the current control mesh to reduce the energy;            and/or    -   the energy further rewards lowness of a sum of squares of        lengths of all edges in the control mesh, lowness of a sum of        squares of principal curvature values at densely sampled points        of a limit surface of the control mesh, and/or regularity of        faces of the control mesh.

It is further provided a computer program comprising instructions forperforming the method.

It is further provided a computer readable storage medium havingrecorded thereon the computer program.

It is further provided a system comprising a processor coupled to amemory and a graphical user interface, the memory having recordedthereon the computer program.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments will now be described, by way of non-limiting example, andin reference to the accompanying drawings, where:

FIG. 1 shows an example of a graphical user interface of the system;

FIG. 2 shows an example of the system; and

FIGS. 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,21 and 22 illustrate the method.

DETAILED DESCRIPTION

Described is a computer-implemented method for 3D reconstruction. Themethod comprises providing 2D images and, for each 2D image, cameraparameters which define a perspective projection. The 2D images allrepresent a same real object. The real object is fixed. The method alsocomprises providing, for each 2D image, a smooth map. The smooth map haspixel values, and each pixel value represents a measurement of contourpresence. The method also comprises determining a 3D modeled object thatrepresents the real object. The determining iteratively optimizesenergy. The energy rewards, for each smooth map, projections ofsilhouette vertices of the 3D modeled object having pixel valuesrepresenting a high measurement of contour presence.

This forms an improved solution for 3D reconstruction.

The method fags within the range of structure-from-motion analysistechniques. Indeed, the method allows to reconstruct in 3D a real objectbased on 2D images. The 2D images are relatively simple and costless toobtain, compared to other types of signals. The method thus forms arelatively simple and costless 3D reconstruction technique.

In addition, the optimization is an iterative optimization. Iterativeoptimization techniques are known to be practical ways of solvingoptimization problems. The method thus performs relatively efficiently.

Now, the method relies in particular on maps having pixel values eachrepresenting a measurement of contour presence. Since the 3D modeledobject optimizes an energy that rewards, for each contour map,projections of silhouette vertices of the 3D modeled object having pixelvalues representing a high measurement of contour presence, the methodallows determining a 3D modeled object whose silhouette is projected oncontours in the 2D images, to the extent possible. The method thusbuilds on an observation that the silhouette of a real objectrepresented by a 2D image translates into contours in the 2D image. As aresult, the 3D reconstruction allowed by the method is relativelyaccurate.

Furthermore, the maps provided in the method are specifically smoothmaps. As a result, the optimization is enabled to follow paths leadingto local extrema of the maps during the iterations, thereby robustlyconverging toward an optimal 3D modeled object. This results inrelatively high accuracy and robustness of the method. The iterativeoptimization may indeed be gradient-based, and for example includecomputations of gradients of the smooth maps to follow such gradients.

The 2D images each represent a physical signal forming a 2D graphicalrepresentation of the real object, for example in a grid arrangement ofpixels. The grids may all be regular and/or rectangular. The 2D imagesmay comprise RGB images and/or grayscale images. The determining may forexample be performed exclusively based on RGB images and/or grayscaleimages. The 2D images may comprise images captured by one or morephysical cameras each having one or more respective sensors, such asphotographs. The providing of the 2D images may comprise such capturingfor at least part of the 2D images, and/or receiving from a distantsystem and/or retrieving in a memory at least (another) part of the 2Dimages.

The 2D images all represent a same real object. For example, the 2Dimages may have been captured at different times each with a same andunique camera viewing the same and unique real object, for example withdifferent camera parameters (e.g. with different camera extrinsicparameters, including from different viewpoints, and/or with differentcamera intrinsic parameters). At least part of the 2D images mayrepresent the real object from different viewpoints. The method thuscombines several pieces of 2D graphical information on the real object(i.e. the 2D images) to build a 3D model of the real object. Inexamples, the 2D images may form different frames of a same videocaption of the real object.

The camera parameters are provided by the method to the determining. Inother words, the camera parameters are known before the determining(i.e. the providing of the camera parameters may be performed prior tothe determining). The camera parameters may for example be known beforeperforming the method, or the method may comprise calculating suchcamera parameters (for example approximately) separately and before thedetermining, e.g. according to any known algorithm. The method is thusrelatively efficient, since the determining does not need to computesaid camera parameters within the optimization. Rather, the determiningmay use as such the provided camera parameters to operate the rewarding(i.e. the rewarding by the optimized energy of the projections of thesilhouette vertices having pixel values representing a high measurementof contour presence for each smooth map). The iterative optimization mayindeed comprise iteratively determining the silhouette verticesrespective to a given 2D image based on the camera parameters, andprojecting the silhouette vertices on the 2D image according to thecamera parameters. The camera parameters of each 2D image may have beenassociated/attached to the image at the time of capturing the image,according to any known technique (out of the scope of the presentdiscussion).

The camera parameters for each 2D image define a respective perspectiveprojection, according to which the (fixed) real object is viewed in the2D image. This simplifies the method, as cameras usually capture 2Dimages according to such a perspective. This also allows to correctlytake into account the perspective, and not approximate it, e.g. with aparallel projection, because that would introduce errors in the process,especially for objects that are photographed from a close distance, andfor which therefore the perspective is more pronounced.

The real object is fixed in the 2D images. In other words, across allthe 2D images inputted to the determining, the real object is immobile.This means that the real object is not moved and not deformed, at leastsubstantially (i.e. deformations and movements are negligible relativeto the dimensions of the real object). As a result, the determining maybe relatively simple to implement, and the optimizing may convergerelatively quickly and robustly. A fixed real object allows an easierand faster combination of the information provided by the differentimages, as said information is more directly comparable. The method thuslies within an industrial application allowing 3D reconstruction of astill physical object, such as a non-biological object. e.g. anindustrial product.

In examples, the method may comprise a user-machine interaction whereina user captures the 2D images with a video camera by moving the videocamera around a fixed real object, for example at a free distance fromthe real object. The video camera may be standard and capture videoframes according to a perspective projection. The method thus forms asimple structure-from-motion analysis.

The providing for each 2D image of a respective smooth map is nowdiscussed.

Each smooth map comprises pixels, for example in the same gridarrangement as the 2D images. Each pixel of each smooth map has a valuewhich represents a measurement of contour presence in the correspondingpixel of the respective 2D image. In other words, each smooth map pixelvalue measures local presence of an image contour.

By “contour”, it is meant any location of a 2D image which correspondsto a (e.g. as sharp as possible) separation between two differenttextures of the 2D image, each texture corresponding to a differentreal-world material. The set of contours thus (e.g. approximately)includes the projected boundary or visible silhouette of a real-worldobject or the boundary of a visible silhouette of a (identifiable) partof a real-world object. Such a notion is known per se from the field ofimage processing, in particular applied to 3D reconstruction. As known,the measurement of contour presence may be a function of the gradient ofthe pixel values of the 3D image. Many different techniques exist in theprior art for obtaining such a measurement.

By “measurement”, it is meant any information on contour presence at thelocation corresponding to the pixel value. Values of different pixels ofa smooth map are comparable together, such that presence of contour canbe compared at different corresponding locations. The pixel values maymonotonously correspond to contour presence (decreasingly respectivelyincreasingly, i.e. a high respectively low pixel value denoting contourpresence more than a low respectively high pixel value, thusrepresenting a relatively high respectively low measurement of contourpresence).

By “smooth”, it is meant that the smooth map has, at least in a vicinity(i.e. neighborhood) of image contours (i.e. everywhere or, alternativelyin such a vicinity), non-zero gradients, that it locally varies in amonotonous way towards local optima, and that it presents a C₀continuity (i.e. it is sufficient, e.g. at the optimum, to have onlypoint continuity, not derivative continuity).

By “rewarding, for a smooth map, projections of silhouette vertices ofthe 3D modeled object having pixel values representing a highmeasurement of contour presence”, it is meant that the optimizationfavors a 3D modeled object having silhouette vertices which project on2D points of the respective 2D image (referred to as “projections ofsilhouette vertices”) corresponding to pixels of the smooth map whosevalues are all the more indicative of the presence of a contour. Theoptimizing may perform such rewarding by minimizing an objectivefunction which comprises a cost term penalizing non-presence of contour,i.e. a low measurement of contour presence. The optimizing may minimizesaid cost term, ceteris paribus, thus maximizing the overall measurementof contour presence by the projections of silhouette vertices.

Thanks to the measurement being provided as a smooth map for each 2Dimage, the optimizing may iteratively follow a monotonous gradient pathof each of the smooth maps to converge with a relatively high speedtoward a local optimum corresponding to a local maximum of contourpresence.

Each smooth map may for example comprise local extrema eachcorresponding to a respective local maximum of contour probability (i.e.the contour probability is locally maximum at a local extremum of thesmooth map). In such a case, the energy may perform the above-discussedrewarding simply as follows: the energy may reward high contourprobability at the projections of the silhouette vertices. The smoothmap may in particular vary from values representing a respective zerocontour probability to said local extrema. Thanks to its smoothness, thegradient of the smooth map is non-zero even at pixels corresponding tozero contour probability, and the gradient-based iterative optimizationmay still be successfully pushed toward the local extrema by therewarding.

The smooth map may for example be a function of a contour probabilitymap. This means that the smooth map is computed from a contourprobability map and inherits the information contained therein. Inparticular, the function maintains positions and values of the extrema(i.e. the extrema of the smooth map are the same, in position and invalue—e.g. modulo an affine mapping, e.g. a 1-p inversion, as discussedlater—, as the extrema of the contour probability map), and the functionresults in non-zero gradients, in monotonous variations towards localoptima, and in C₀ continuity. The method may comprise providing acontour probability map for each 2D image, and applying the function toeach contour probability map (so as to output the corresponding smoothmap). This allows determining a relatively accurate 3D modeled object,since the optimizing fully relies on the relatively fine informationprovided by the contour probability map. The function may be amonotonous function.

A contour probability map is, as known, a map which has pixel valueseach representing a probability of contour presence. Such a map may becomputed in any know manner, for example based on a machine-learningscheme implemented on an annotated dataset of 2D images associated withcontour probability maps or contour maps (a contour map being a mapwhose pixel values each represent binarily contour presence or absence).Such a machine-learning may for example be performed according to orsimilarly to the teaching of paper by S. Xie, Z. Tu.,Holistically-nested edge detection, in Proceedings of the IEEEinternational conference on computer vision (pp. 1395-1403), 2015, whichis incorporated herein by reference. The edge detection method describedin this paper is based on the learning of a network for predicting theedges of an image, by supervised training on an image dataset whereannotated the edges. The network extracts multiscale predictions, andthe classification loss for each pixel compares the cross-entropybetween the binary mask ground-truth of the edges and the prediction ofthe edges at each scale. The predictions at each scale are thenaggregated to give a final prediction.

Alternatively, the method may compute the contour probability mapsaccording to the teaching to any one of a number of other papers whichdisclose a machine-learning to predict edges in a supervised manner (thedifferences of which are mainly expressed in terms of architectures andlosses), for example the following papers which are all incorporatedherein by reference:

-   DeepEdge: A Multi-Scale Bifurcated Deep Network for Top-Down Contour    Detection, Gedas Bertasius, Jianbo Shi, Lorenzo Torresani, CVPR    2015;-   Object Contour Detection with a Fully Convolutional Encoder-Decoder    Network, Jimei Yang, Brian Price, Scott Cohen, Honglak Lee,    Ming-Hsuan Yang, CVPR 2016; or-   Pixel-Wise Deep Learning for Contour Detection, Jyh-Jing Hwang,    Tyng-Luh Liu, ICLR Workshop 2015.

Yet alternatively the contour probability map may be computed by adeterministic method. Such deterministic methods are widely known, andthe method may for example comprise computing the Chamfer map of theresult of a Canny-edge detection.

The function may be (the result of) a smoothing of a monotonous (e.g.affine) mapping. The smoothing is a function as described above, thatis, the smoothing maintains positions and values of the extrema, and thesmoothing results in non-zero gradients, in monotonous variationstowards local optima, and in C₀ continuity. As a result of thecombination of such a smoothing with a monotonous (e.g. affine) mapping,information of the initial probability map is maintained, in particularinformation allowing comparison of contour presence between differentpixels. The affine mapping (i.e. function) may be the probabilitycomplementary mapping (i.e. 1 minus the probability). Thus, the smoothmap may form a smoothed inverted contour probability map having pixelvalues each representing a probability of contour absence (i.e. thecomplementary value of a contour probability) after smoothing. Thisincreases convergence speed. In such a case, the optimization problem isa minimization problem. Alternatively, the monotonous mapping may theidentity. In such a case, the optimization problem is a maximizationproblem.

Any smooth map herein may for example result from a scheme whichcomprises computing a contour probability map (for example as discussedabove), applying a monotonous (e.g. affine) mapping to the contourprobability map (e.g. which may the probability complementary mapping,or alternatively, simply the identity mapping), and smoothing the resultof the mapping (in any known manner, for example as later described).The method may comprise performing the scheme for at least part (e.g.all) of said smooth maps, and/or receiving and/or retrieving at leastpart of said smooth maps as such.

The method may alternatively use a distance transform of the image inorder to generate a map that contains the distance to the nearestcontour at each pixel. However, such an approach requires a thresholdvalue to identify the contours that have a probability value above thatthreshold and then compute the distance transform of the image. Thismeans that the difference in probability of two contours that are bothwithin the threshold is lost, and the contour probability information isnot exploited in its entirety.

As mentioned above, the determining comprises an optimization schemewhich is iterative and may be gradient-based, iteratively computing thegradient of the smooth maps for each silhouette vertex projection, toconverge toward a 3D modeled object which achieves overall optimumacross the smooth maps (thereby representing global maximum of contourprobability).

The optimization may comprise, at each iteration, providing a “current”3D modeled object, determining the projections of the silhouettevertices, and modifying the 3D modeled object to reduce the energy (e.g.including computing the gradients of the smooth maps at pixelscorresponding to the projections). The 3D modeled object as modified maybe inputted to the next iteration as the “current” 3D modeled object ofsaid next iteration, until a convergence criterion is reached.

The iterative optimization may start from a 3D modeled object whichforms an approximation of the optimal 3D modeled object sought by themethod. Such an initialization of the optimization with an approximate3D model of the real object allows a fast and robust convergence of theoptimization. This also makes it possible to be satisfied with a “smoothmap” which is only “locally smooth”, i.e. there can be zero gradientzones elsewhere, as long as locally, where the projection of the initialshape is located and up to the pixels of maximum contour probability,the gradients are “good”. As a consequence, the smoothness requirementlies only in the vicinity of true contours, as long as the silhouettesof the initial shape project in these areas. Such an approximation maybe obtained in any known manner, for example executing an existing 3Dreconstruction technique. Examples are discussed later.

The method is computer-implemented. This means that steps (orsubstantially all the steps) of the method are executed by at least onecomputer, or any system alike. Thus, steps of the method are performedby the computer, possibly fully automatically, or, semi-automatically.In examples, the triggering of at least some of the steps of the methodmay be performed through user-computer interaction. The level ofuser-computer interaction required may depend on the level of automatismforeseen and put in balance with the need to implement user's wishes. Inexamples, this level may be user-defined and/or pre-defined.

A typical example of computer-implementation of a method is to performthe method with a system adapted for this purpose. The system maycomprise a processor coupled to a memory and a graphical user interface(GUI), the memory having recorded thereon a computer program comprisinginstructions for performing the method. The memory may also store adatabase. The memory is any hardware adapted for such storage, possiblycomprising several physical distinct parts (e.g. one for the program,and possibly one for the database).

The method generally manipulates modeled objects. A modeled object isany object defined by data stored e.g. In the database. By extension,the expression “modeled object” designates the data itself. According tothe type of the system, the modeled objects may be defined by differentkinds of data. The system may indeed be any combination of a CAD system,a CAE system, a CAM system, a PDM system and/or a PLM system. In thosedifferent systems, modeled objects are defined by corresponding data.One may accordingly speak of CAD object, PLM object, PDM object, CAEobject, CAM object, CAD data, PLM data, PDM data, CAM data, CAE data.However, these systems are not exclusive one of the other, as a modeledobject may be defined by data corresponding to any combination of thesesystems. A system may thus well be both a CAD and PLM system.

By CAD system, it is additionally meant any system adapted at least fordesigning a modeled object on the basis of a graphical representation ofthe modeled object, such as CATIA. In this case, the data defining amodeled object comprise data allowing the representation of the modeledobject. A CAD system may for example provide a representation of CADmodeled objects using edges or lines, in certain cases with faces orsurfaces. Lines, edges, or surfaces may be represented in variousmanners, e.g. non-uniform rational B-splines (NURBS). Specifically, aCAD file contains specifications, from which geometry may be generated,which in turn allows for a representation to be generated.Specifications of a modeled object may be stored in a single CAD file ormultiple ones. The typical size of a file representing a modeled objectin a CAD system is in the range of one Megabyte per part. And a modeledobject may typically be an assembly of thousands of parts.

In the context of CAD, a modeled object may typically be a 3D modeledobject, e.g. representing a product such as a part or an assembly ofparts, or possibly an assembly of products. By “3D modeled object”, t ismeant any object which is modeled by data allowing its 3Drepresentation. A 3D representation allows the viewing of the part fromall angles. For example, a 3D modeled object, when 3D represented, maybe handled and turned around any of its axes, or around any axis in thescreen on which the representation is displayed. This notably excludes2D icons, which are not 3D modeled. The display of a 3D representationfacilitates design (i.e. Increases the speed at which designersstatistically accomplish their task). This speeds up the manufacturingprocess in the industry, as the design of the products is part of themanufacturing process.

By CAM system, it is additionally meant any solution, software ofhardware, adapted for managing the manufacturing data of a product. Themanufacturing data generally includes data related to the product tomanufacture, the manufacturing process and the required resources. A CAMsolution is used to plan and optimize the whole manufacturing process ofa product. For instance, it can provide the CAM users with informationon the feasibility, the duration of a manufacturing process or thenumber of resources, such as specific robots, that may be used at aspecific step of the manufacturing process; and thus allowing decisionon management or required investment. CAM is a subsequent process aftera CAD process and potential CAE process. Such CAM solutions are providedby Dassault Systèmes under the trademark DELMIA®.

By CAE system, it is additionally meant any solution, software ofhardware, adapted for the analysis of the physical behavior of a modeledobject. A well-known and widely used CAE technique is the Finite ElementMethod (FEM) which typically involves a division of a modeled objet intoelements which physical behaviors can be computed and simulated throughequations. Such CAE solutions are provided by Dassault Systèmes underthe trademark SIMULIA®. Another growing CAE technique involves themodeling and analysis of complex systems composed of a pluralitycomponents from different fields of physics without CAD geometry data.CAE solutions allow the simulation and thus the optimization, theimprovement and the validation of products to manufacture. Such CAEsolutions are provided by Dassault Systèmes under the trademark DYMOLA®.

The 3D modeled object reconstructed by the method may represent thegeometry of a product to be manufactured in the real world subsequent tothe completion of its virtual design with for instance a CAD softwaresolution or CAD system, such as a (e.g. mechanical) part or assembly ofparts (or equivalently an assembly of parts, as the assembly of partsmay be seen as a part itself from the point of view of the method, orthe method may be applied independently to each part of the assembly),or more generally any rigid body assembly (e.g. a mobile mechanism). ACAD software solution allows the design of products in various andunlimited industrial fields, including: aerospace, architecture,construction, consumer goods, high-tech devices, industrial equipment,transportation, marine, and/or offshore oil/gas production ortransportation. The 3D modeled object reconstructed by the method maythus represent an industrial product which may be any mechanical part,such as a part of a terrestrial vehicle (including e.g. car and lighttruck equipment, racing cars, motorcycles, truck and motor equipment,trucks and buses, trains), a part of an aerial vehicle (including e.g.airframe equipment, aerospace equipment, propulsion equipment, defenseproducts, airline equipment, space equipment), a part of a naval vehicle(including e.g. navy equipment, commercial ships, offshore equipment,yachts and workboats, marine equipment), a general mechanical part(including e.g. Industrial manufacturing machinery, heavy mobilemachinery or equipment, installed equipment, industrial equipmentproduct, fabricated metal product, tire manufacturing product), anelectro-mechanical or electronic part (including e.g. consumerelectronics, security and/or control and/or instrumentation products,computing and communication equipment, semiconductors, medical devicesand equipment), a consumer good (including e.g. furniture, home andgarden products, leisure goods, fashion products, hard goods retailers'products, soft goods retailers' products), a packaging (including e.g.food and beverage and tobacco, beauty and personal care, householdproduct packaging).

FIG. 1 shows an example of the GUI of the system, wherein the system isa CAD system.

The GUI 2100 may be a typical CAD-like interface, having standard menubars 2110, 2120, as well as bottom and side toolbars 2140, 2150. Suchmenu- and toolbars contain a set of user-selectable icons, each iconbeing associated with one or more operations or functions, as known inthe art. Some of these icons are associated with software tools, adaptedfor editing and/or working on the 3D modeled object 2000 displayed inthe GUI 2100. The software tools may be grouped into workbenches. Eachworkbench comprises a subset of software tools. In particular, one ofthe workbenches is an edition workbench, suitable for editinggeometrical features of the modeled product 2000. In operation, adesigner may for example pre-select a part of the object 2000 and theninitiate an operation (e.g. change the dimension, color, etc.) or editgeometrical constraints by selecting an appropriate icon. For example,typical CAD operations are the modeling of the punching or the foldingof the 3D modeled object displayed on the screen. The GUI may forexample display data 2500 related to the displayed product 2000. In theexample of the figure, the data 2500, displayed as a “feature tree”, andtheir 3D representation 2000 pertain to a brake assembly including brakecaliper and disc. The GUI may further show various types of graphictools 2130, 2070, 2080 for example for facilitating 3D orientation ofthe object, for triggering a simulation of an operation of an editedproduct or render various attributes of the displayed product 2000. Acursor 2060 may be controlled by a haptic device to allow the user tointeract with the graphic tools.

FIG. 2 shows an example of the system, wherein the system is a clientcomputer system, e.g. a workstation of a user.

The client computer of the example comprises a central processing unit(CPU) 1010 connected to an internal communication BUS 1000, a randomaccess memory (RAM) 1070 also connected to the BUS. The client computeris further provided with a graphical processing unit (GPU) 1110 which isassociated with a video random access memory 1100 connected to the BUS.Video RAM 1100 is also known in the art as frame buffer. A mass storagedevice controller 1020 manages accesses to a mass memory device, such ashard drive 1030. Mass memory devices suitable for tangibly embodyingcomputer program instructions and data include all forms of nonvolatilememory, including by way of example semiconductor memory devices, suchas EPROM, EEPROM, and flash memory devices; magnetic disks such asinternal hard disks and removable disks; magneto-optical disks; andCD-ROM disks 1040. Any of the foregoing may be supplemented by, orincorporated in, specially designed ASICs (application-specificintegrated circuits). A network adapter 1050 manages accesses to anetwork 1060. The client computer may also include a haptic device 1090such as cursor control device, a keyboard or the like. A cursor controldevice is used in the client computer to permit the user to selectivelyposition a cursor at any desired location on display 1080. In addition,the cursor control device allows the user to select various commands,and input control signals. The cursor control device includes a numberof signal generation devices for input control signals to system.Typically, a cursor control device may be a mouse, the button of themouse being used to generate the signals. Alternatively or additionally,the client computer system may comprise a sensitive pad, and/or asensitive screen.

The computer program may comprise instructions executable by a computer,the instructions comprising means for causing the above system toperform the method. The program may be recordable on any data storagemedium, including the memory of the system. The program may for examplebe implemented in digital electronic circuitry, or in computer hardware,firmware, software, or in combinations of them. The program may beimplemented as an apparatus, for example a product tangibly embodied ina machine-readable storage device for execution by a programmableprocessor. Method steps may be performed by a programmable processorexecuting a program of instructions to perform functions of the methodby operating on input data and generating output. The processor may thusbe programmable and coupled to receive data and instructions from, andto transmit data and instructions to, a data storage system, at leastone input device, and at least one output device. The applicationprogram may be implemented in a high-level procedural or object-orientedprogramming language, or in assembly or machine language if desired. Inany case, the language may be a compiled or interpreted language. Theprogram may be a full installation program or an update program.Application of the program on the system results in any case ininstructions for performing the method.

The method may be part of a process for designing a 3D modeled object,for example including editions of the reconstructed 3D modeled objects.“Designing a 3D modeled object” designates any action or series ofactions which is at least part of a process of elaborating a 3D modeledobject.

The method may be included in a manufacturing process, which maycomprise, after performing the method, producing a physical productcorresponding to the modeled object (for example after the editions). Inany case, the modeled object designed by the method may represent amanufacturing object. The modeled object may thus be a modeled solid(i.e. a modeled object that represents a solid). The manufacturingobject may be a product, such as a part, or an assembly of parts.Because the method improves the design of the modeled object, the methodalso improves the manufacturing of a product and thus increasesproductivity of the manufacturing process.

An implementation of the method where the determined 3D modeled objectis a control mesh of a subdivision surface is now discussed withreference to FIGS. 3-22 .

The implementation of the method provides a new solution to generate a3D modeled object (or 3D model) that fits multiple images of a givenreal-world object. The resulting model may be a control mesh for asubdivision surface that fits to an object's contours in multipleimages, and that can easily be processed by existing CAD and/or CAMsoftware.

A control mesh of a subdivision surface is a synthetic representation ofa 3D shape, and as such it takes relatively little memory space and canbe manipulated for editions relatively easily. Furthermore, such acontrol mesh may be subdivided to perform specific editions, for exampleadd details, and/or to perform simulations requiring a certain finiteelement size. The method may comprise any such post-use of the obtainedcontrol mesh. In addition, the method may use the control mesh format inan efficient way to conduct the optimizing. Furthermore, the method mayintroduce terms in the energy specific to control meshes.

Subdivision surfaces have been used in 3D software for a long time. Theimplementation of the method may aim for subdivision surfaces based onquad-dominant control meshes and a Catmull-Clark subdivision scheme. Theobtained control mesh and its defined subdivision surface may thus beaccording to the teaching of paper by E. Catmull, J. Clark., Recursivelygenerated b-spline surfaces on arbitrary topological meshes,Computer-Aided Design, 10(6) (pp. 350-355), 1978, which is incorporatedherein by reference.

In this discussion of the implementation of the method, the terms“fitting a control mesh” and “fitting a subdivision surface” to a giventarget, are equivalent and pertain to the act of automatically movingthe positions of the vertices of the control mesh so that its limitsurface (or the mesh after a sufficient number of subdivision steps)fits the target. FIG. 3 illustrates the process of continuouslysubdividing a simple control mesh up to reaching the limit surface.

The implementation of the method allows obtaining of a control mesh thatwhen sufficiently subdivided fits to multiple views of an existingobject. The input data include raw 2D images with corresponding cameraparameters, and an initial dense mesh that roughly approximates theobject (in the same reference system as the cameras). The latter may beobtained, for instance, by using a space carving technique after(roughly) segmenting the images. This may be performed according to theteaching of paper by K. N. Kutulakos, S. M. Seitz, A theory of shape byspace carving, international journal of computer vision, 38(3) (pp.199-218), 2000, which is incorporated herein by reference. This papershows how a mesh may be generated from multiple images of an object byspace carving. This technique performs rough identification of theobjects contours and generates an approximate dense mesh that cannot beused as is for editing in CAD and/or CAM software. However, it providesa suitable input to the implementation of the method.

The implementation of the method forms a new pipeline for generating asubdivision surface (i.e. a parametric shape) that fits to multipleimages of the same object. The implementation of the method uses asubdivision surface because it provides a simple and generic model for aparametric shape and allows easy evaluation of the surface and itsgeometric characteristics. However alternatively, other models, e.g. aparametric exact boundary representation (used in CAD software), mayalso be optimized in the same manner.

Referring to FIG. 4 , starting from a set of images 40 of the objectwith the corresponding camera parameters, and a dense mesh 42 thatroughly approximates the shape (such as one obtained by earlier-citedpaper A theory of shape by space carving), the implementation of themethod may create a simplified quad-dominant control mesh that whensubdivided fits the object in the provided images according to thepipeline shown on FIG. 5 . The more the images are relevant, i.e. themore they cover the object from all possible viewpoints, the moreaccurate the resulting 3D shape (i.e. the more it corresponds to theactual object). In examples, the 2D images provided in theimplementation of the method may thus cover the real object fromdifferent viewpoints.

The images may then be pre-processed to detect all the contours in theimage, including, but not limited to, those that correspond to theobject. This may for example be performed as discussed earlier accordingto the teaching of paper Holistically-nested edge detection. This paperdevelops a new edge and boundary detection algorithm that uses adeep-learning model. The implementation of the method may use thissolution to generate probability maps with all the contours in theprovided image set (regardless of whether they are contours of thetarget object or not).

Separately, the implementation of the method may simplify the dense meshinto an initial control mesh. This may for example be performed astaught in paper by J. Wenzel, M. Tarini, D. Panozzo, and O.Sorkine-Hornung, Instant field-aligned meshes, ACM Transactions onGraphics (Proceedings of SIGGRAPH ASIA), 34 (6), 2015, which isincorporated herein by reference. This paper proposes a technique forsimplifying a dense mesh into a uniform quad-dominant mesh. Theimplementation of the method may use this technique in a step of itsproposed pipeline.

Since the two are rather far apart for the present purposes, theimplementation of the method may use a scheme to fit this initialcontrol mesh back to the dense mesh (using the point cloud correspondingto its vertices). This may for example be performed as taught by paperby V. Estellers, F. R. Schmidt. and D. Cremers, Compression for smoothshape analysis, arXiv preprint arXv:1711.10824, 2017, and by paper V.Estellers, F. Schmidt, D. Cremers, Robust Fitting of SubdivisionSurfaces for Smooth Shape Analysis, international Conference on 3DVision (3DV) (pp. 277-285), IEEE, 2018, which are incorporated herein byreference. These papers introduce a scheme for fitting a control mesh toa target point cloud. Said scheme first generates an estimated controlmesh that very roughly fits the shape defined by the cloud, and thenapplies an iterative linear optimization scheme to adapt the controlmesh to the target. An existing public prototype is available and hasbeen tested. The results are robust and satisfy the stated objective,which is the computational analysis of the shape. However, the resultingcontrol mesh is not uniformly dense and therefore difficult to use forfurther editing. More importantly, using this scheme to reconstruct a 3Dshape from multiple images would require first generating a dense pointcloud from the same images. This constitutes a separate difficultproblem that the implementation of the method may avoid.

Since the provided dense mesh is only a rough approximation, thesubdivision of the resulting modified control mesh does not yet fit thecontours of the object in the various images. The implementation of themethod uses an optimization scheme to optimally fit to the objectscontours in the images. Finally, the implementation of the method mayalso add a post-processing phase to further smooth areas of theresulting shape that were not fitted because no contour was found forthat particular area in any of the provided images.

Details on these various steps of the implementation of the method shownon FIG. 5 are discussed hereunder.

The implementation of the method fits a rigid object to multiple views,and, therefore, the more relevant images are used, the better the resultdescribes the real object. The implementation of the method does notrequire and may exclude precise identification of the right contour ineach image, but it may process the raw images automatically. Theimplementation of the method may exclude manually selected constraintpoints. The implementation of the method may take into account arealistic perspective projection, which means that implementation of themethod may use photos taken at any distance from the object. Becausecamera parameters are now provided by current capture devices, they neednot be computed. Therefore, the silhouette of the object may be computedexplicitly rather than by minimizing an energy, which leads to highercomputation robustness and better performances. The implementation ofthe method may use as input approximate results (e.g. from oldermethods) to obtain a shape that both better fits the real object and canbe further edited with existing software. Also, the result of theimplementation of the method requires considerably less memory spacethan any dense mesh (or point cloud) obtained by existing techniques.The implementation of the method may allow addition of new energy termsto regularize the resulting shape. The implementation of the method mayallow a post-processing phase that further smooths areas for which nocontour was found in any image.

Examples of the generation of a simplified quad-dominant control meshare now discussed.

The subdivision surface that the implementation of the method fits tothe views may be defined by a quad-dominant control mesh. The initialform of the unfitted control mesh may either be provided as an input tothe method or may be created from the provided dense mesh. For instance,the implementation of the method may use the method introduced byearlier-cited paper instant field-aligned meshes to generate asimplified quad-dominant mesh from the provided dense mesh, but anyother method that may generate a simplified quad-dominant mesh would beequally satisfying. It is important to note that the limit surface ofthe resulting control mesh has no reason to be precisely close to eitherthe provided dense mesh or the actual object, as shown on FIG. 6 .

Examples of fitting the control mesh to the dense input mesh are nowdiscussed.

The implementation of the method may use the scheme proposed inearlier-cited papers Compression for smooth shape analysis and RobustFitting of Subdivision Surfaces far Smooth Shape Analysis to fit thegenerated control mesh generated as best as possible to the input densemesh, because this is a best first estimation of the actual object. FIG.7 illustrates the result.

However, the implementation of the method may introduce some changes tosaid scheme. For instance, if the target point cloud corresponds to arelatively thin object with a cavity, e.g. a vase as represented on FIG.8 , and the simple control mesh is simply a convex subdivision surfacethat engulfs the target, the implementation of the method may establisha correct initial correspondence between the two, to obtain the cavityin the fitted subdivision surface. The implementation of the method maynotably avoid wrong correspondences between areas that have oppositeorientations.

The implementation of the method may therefore add a normal vectorscomparison in the point correspondence computation: if the dot productof their normal vectors is lower than a threshold value, the two pointsare not in correspondence. Consequently, points on the outer shell arenot attracted by target points on the inner shell of the object.

The implementation of the method may also add optional weightcomputation functionality based on the initial evaluation of the variousenergy terms. The weight coefficients for the energy terms may either beprovided or else computed at the initial evaluation of the energy termsin order to ensure specific ratios between the four terms. These ratioscan be either default values of the system or else user-provided.

The implementation of the method may also add a new energy term, usingspring energy terms to attract the control points to their initialpositions. This may be useful to keep as close as possible to theinitial control mesh, or at least parts of it.

Lastly, the implementation of the method may also replace the generationof the non-uniform control mesh with the method introduced inearlier-cited paper Instant field-aligned meshes. This has been testedto lead to better results, in the present context.

Examples of contour detection are now discussed.

The implementation of the method may use the solution presented inearlier-cited paper Holistically-nested edge detection to generate acontour probability map for each image, as illustrated on FIG. 9 . Thepixels with the highest probability values in the map indicate thelocation of the detected contours. The detected contours have differentprobabilities, e.g. border contours of internal reflection artifactshave a lower probability than hard contrast contours that correspond tothe actual border of the object in the image. The implementation of themethod may invert the probability map in order to obtain a fittingenergy map (i.e. compute a map corresponding to 1 minus the value of theprobability map). The contour pixels thus correspond to the local minimaof the fitting energy, which is better suited to a minimization scheme.

The implementation of the method may then compute points that lie on theapparent contour of the current shape of the subdivision surface (bysubdividing the control mesh). These points may be projected, using thecamera parameters, onto the fitting energy map. The lower the fittingenergy value at the projection point, the more likely it is that thepoint is on an actual contour.

Two observations may be made.

First, if the projected contour of the current shape (i.e. contour 102in FIG. 10 ) were far from the target contour of the object in theimage, it would be more difficult to converge towards the target contour(i.e. contour 104 in FIG. 10 ). This is due to the fact that the examplecontour detection does not eliminate all unwanted contours from thefitting energy map, and some of those contours may attract the shapeduring the optimal contour fitting phase.

However, since the implementation of the method starts from anapproximation of the desired shape, in the same reference system as theone in which the camera parameters are defined, the initial apparentcontour is generally not too far from the actual object's contour in theimages (see FIG. 11 ), i.e. the probability to converge towards thecorrect contour is much higher.

Second, even starting with point projections that are near the targetcontour, the local gradient of the fitting energy map may be very flat,effectively keeping the optimization from converging towards the targetcontour (see FIG. 12 ).

Since the technique of paper Holistically-nested edge detection, as anyother contour detection algorithm, alms to generate (e.g. almost) binaryimages of clearly delineated contours, locally flat gradients arebasically a specification feature of such techniques. Deep-learningtechniques such as described in this paper are statistic in nature andthus obtain non-binary probability values that are, however, very closeto 0 or 1 (and hence still contain fat gradient areas). This isespecially true for high-resolution (e.g. 4K) images such as obtained bycurrent capture devices. In order to avoid this kind of situation, theimplementation of the method may apply a local filter to the fittingenergy map to widen the area where the gradient is non-zero (see FIG. 13).

The smoothing filter may for example comprise at least one applicationof a Gaussian blur (applied to the contour probability map). TheGaussian blur operates a modification of the contour map from the shapeof FIG. 12 featuring flat areas with zero gradients, to the shape ofFIG. 13 which allows better convergence of the optimization.

A simple and single Gaussian blur reduces the amplitude. To avoid losingthe minimum values in the contour image, the method may rather consider(e.g. apply) a smoothing which comprises determining an envelope ofapplication of a family of Gaussian blurs to the contour probabilitymap, each Gaussian blur having a different kernel size.

For example, the implementation of the method may consider the envelopeof the initial fitting energy map and all its Gaussian blurs (see FIG.14 ).

The implementation of the method may consider the initial fitting energymap E_(i) ⁰ as a function defined in

². The implementation of the method may define the Gaussian transformG_(σ)*E_(i) ⁰ of E_(i) ⁰ with a standard deviation σ:

${\left( {G_{\sigma}*E_{i}^{0}} \right)\left( {x,y} \right)} = {\int_{- \infty}^{+ \infty}{\int_{- \infty}^{\infty}{\frac{1}{\sqrt{2\pi} \cdot \sigma}e^{({- \frac{{({x - u})}^{2} + {({y - v})}^{2}}{2\sigma^{2}}})}{E_{i}^{0}\left( {u,v} \right)}{dudv}}}}$

The smoothed fitting energy map may be defined as the envelope of thefamily of functions E_(i) ⁰∪{G_(σ)*E_(i) ⁰}_(σ∈)

_(>0) .

The implementation of the method may apply an approximation of thisenvelope by iterating successive Gaussian blurs while increasing thekernel size and combine them with the previous image by keeping theminimum value for each pixel, e.g. E_(i) ^(k)=min(E_(i)^(k-1),G_(k)*E_(i) ⁰) where G_(k) is the Gaussian filter with kernelsize 2k+1, and E_(i) ⁰ is the initial unsmoothed map. Faster ways ofproducing a similar result implementable by the method, however withlower or at least different gradient values, is to either skip someintermediate filters, e.g. E_(i) ^(k)=min (E_(i) ^(k-1),G_(2k)*E_(i) ⁰),or else convolute the Gaussian filters iteratively (since applyingmultiple successive Gaussian filters is equivalent to applying a singleGaussian filter with a higher kernel size), e.g. E_(i) ^(k-1)=min(E_(i)^(k-1),G_(k)*ε_(i) ^(k)) with ε_(i) ^(k)=G_(k)*ε_(i) ^(k-1) and ε_(i)⁰=E_(i) ⁰.

Any other filter that generates a similar map would serve equally welland may thus be applied by the method. e.g. using a filter thatconvolutes the image with a kernel obtained from a Laplace distributionresults in something quite similar (see FIG. 15 ), i.e.:

${\left( {L_{\sigma}*E_{i}^{0}} \right)\left( {x,y} \right)} = {\int_{- \infty}^{+ \infty}{\int_{- \infty}^{\infty}{\frac{1}{4\sigma}e^{({- \frac{{❘{x - u}❘} + {❘{y - v}❘}}{2\sigma}})}{E_{i}^{0}\left( {u,v} \right)}{dudv}}}}$

FIG. 16 shows a close up view of a contour map before and after applyingthis kind of filter.

In conclusion, the implementation of the method may operate a fittingenergy map that has non-zero gradients, which locally decrease in amonotonous way towards the minimum value, thus increasing theconvergence speed. However, the implementation of the method may notrequire more than C₀ continuity at the minimum.

As mentioned earlier, another approach might have been to use a distancetransform of the image in order to generate a map that contains thedistance to the nearest contour at each pixel. However, this wouldrequire a threshold value to identify the contours that have aprobability value above that threshold and then compute the distancetransform of the image. This means that the difference in probability oftwo contours that are both within the threshold is lost, whereas theimplementation of the method allows exploitation of the result of thecontour detection algorithm in its entirety.

Examples of the fitting to the contours are now discussed.

The implementation of the method may fit the earlier-discussedquad-dominant control mesh to all provided images by minimizing afitting energy between the silhouette of the subdivision surface and thecontours in the contour maps (one for each provided image). The fittingenergy may, rather than using the distance between the silhouettes andthe contours in each image, use the earlier-discussed fitting energymaps computed for each image. At each iteration, the process firstcomputes the silhouettes for the current limit surface, and then deformsthe surface by minimizing the fitting energies for all images (see FIG.17 ).

Because the camera parameters are already known, the implementation ofthe method may separate the computation of the silhouette points on the3D surface, which can be done explicitly and does not require anoptimization. This is in opposition to methods which consider the(simplified) camera parameters and the silhouette points on the 3Dsurface as unknown variables and perform a more complex optimization,and whose energy function is defined in a variable space of aconsiderably higher dimension, leading to presumably longer computationtimes and maybe less robust computation results. Specifically, thedimension of the variable space in such methods would grow with thenumber of provided images, thus ultimately limiting the number of imagesthat can be used. The optimization of the implementation of the methodon the contrary is performed in a variable space whose dimension onlydepends on the number of vertices in the control mesh and is independentof the number of provided images, which makes it easier to use manyimages and thus to better describe the object.

The method may comprise, at each iteration of the optimizing, providinga current control mesh, subdividing the current control mesh into asubdivided mesh, executing a loop on each 2D image, and modifying thecurrent control mesh to reduce the energy. The loop comprises, for each2D image, projecting the subdivided mesh on the 2D image, computing a 2Dsilhouette of the 3D modeled object in the 2D image, and identifyingpoints of the subdivided mesh corresponding to the 2D silhouette, as thesilhouette vertices. This is detailed in the following. Optionally, thetopology of the subdivided mesh after the first iteration may be stored,so as to be reused at the next iterations of the subdividing. Thisallows saving time.

Thus, the determination of the 3D silhouette vertices may be redone witheach iteration of the optimization. The topology of the mesh(connections between vertices, number of edges, and number of polygons)does not change. The topology of the overall shape in the sense of theEuler characteristic does not change either. The subdivision, in thesense of determining the connections between the subdivided vertices,may therefore only be done once. On the other hand, as the coordinatesof the vertices of the control mesh change, the method may recalculatethe coordinates of the vertices of the subdivided mesh (which approachesthe limit surface) after each iteration. The calculation of the 3Dsilhouettes vertices may come after.

Sets of silhouette points may be computed for each image by using thecamera parameters and computing a depth map of the current shape of thesubdivision surface and keeping only the points whose image is a borderpixel of the object's projection (see FIG. 18 : depth map and borderpixels 180 on the left side, subdivided mesh and silhouette points 182on the right side). If several points project on the same pixel, the onethat has the same depth as the depth value at the pixel may be used,i.e. the implementation of the method may avoid using hidden points inthe silhouette.

The implementation of the method may identify the location of thesilhouettes on the current shape of the subdivision surface for itsprojection in each image. The implementation of the method mayapproximate the subdivision surface by subdividing the control mesh asufficient number of times n into a refined mesh R_(n). Theimplementation of the method may subdivide three times, but n is aparameter that can be defined at the beginning of the process. Theimplementation of the method may therefore look for the subset Σ_(i) ofvertices of R_(n) that will project on the silhouette of the shape in i.Since R_(n) is sufficiently refined, these vertices give a goodapproximation of the actual location of the silhouette on thesubdivision surface.

Using the projection transformation π_(i), for image i, theimplementation of the method may compute the depth map D_(i) of thescene that contains only the current shape of the subdivision surface.The implementation of the method may identify the subset of silhouettepixels S_(i) of D_(i) so that any silhouette pixel p_(s)∈S_(i) isadjacent to a background pixel p_(bg). Background pixels are identifiedby a depth value D_(i)(p_(bg)) that is traditionally set to 0 in depthmaps. The implementation of the method may extend the silhouette pixelsby including pixels that are not directly adjacent to background pixelsbut lie in a neighborhood (the size of which may also be defined) thatincludes a background pixel.

Having identified all silhouette points, the implementation of themethod may verify for each vertex v of R_(n) whether its projectionπ_(i)(v) is a silhouette pixel p_(s) in which case v is part of thesubset of silhouette vertices Σ_(i) of R_(n). If several verticesproject on the same pixel, only the vertex with the same depth as thecomputed pixel depth is kept in Σ_(i).

The implementation of the method may now compute the value of thefitting energy for each silhouette vertex v∈Σ_(i) with E_(i)(π_(i)(v))where E_(i) is the fitting energy map computed for image i.

If E_(i)(π_(i)(v)) reaches a minimum, then the silhouette vertexprojects onto a contour identified in the image.

If all fitting energy values, for all silhouette vertices and allimages, (globally) reach a minimum, then the projected silhouettes ofthe subdivision surface are identical to the identified silhouettes ofthe object in the images (because the implementation of the methodstarts with a shape that is already close to the object).

To verify how well the provided images cover the form of the surface, avisual verification was made by coloring all vertices that appear assilhouette points in at least one or more images (see FIG. 19 : greyareas appear as silhouettes in at least one image, white areas are notpart of any silhouette).

Each silhouette point may be assigned a value from its fitting energymap. The sum of the squares of these values may define the main fittingenergy term to be minimized. Since the silhouette points are computed onthe limit surface of the subdivision (or at least on the mesh resultingfrom a number of subdivision steps), it can be expressed as a linearfunction of the vertex coordinates of the control mesh, i.e. thevariables of the problem to be solved.

-   -   π_(i) Projection transformation for image (based on the provided        camera parameters)    -   x Vertex coordinates of control mesh    -   s_(ij)=S_(ij)(x) Silhouette point j on the subdivision surface        for a given image i (S_(ij) is a linear function of x)    -   e_(ij)=E_(i)(π_(i)(s_(ij)(x))) Fitting energy for a silhouette        point (using the fitting energy map E_(i) of image i), i.e. the        lower the fitting energy, the higher the probability that the        point projects on a contour

The fitting energy term may be defined by E_(fit)=Σ_(i,j)e_(ij) ² whichmay be minimized for the silhouettes to fit the contours in all images.

Since the 3D modeled object is a control mesh (of a subdivisionsurface), specific terms may be added. Notably, the energy may rewardlowness of a sum of squares of lengths of all edges in the control mesh,lowness of a sum of squares of principal curvature values at denselysampled points of a limit surface of the control mesh, and/or regularityof faces of the control mesh. This allows obtaining an industriallycleaner control mesh, which performs more accurately in simulations andis easier to manipulate.

This may correspond to three different regularization terms beingincluded in the total energy to minimize:

-   -   E_(edges)=Σd_(edge) ² The sum of the squares of the lengths of        all edges in the control mesh, E_(edges) is a quadratic function        of x,    -   E_(curvature)=Σc₁ ²+c₂ ² The sum of the squares of the two        principal curvature values c₁ and c₂ at densely sampled points        of the limit surface. The method may in particular use the        curvature values, rather than the second order derivatives with        respect to parameters defined on the subdivision surface,        because it is more directly linked to the shape of the surface        and independent of the parameterization. For subdivision        surfaces, the second order derivatives can be easily evaluated        using x. The principal curvatures may computed from the second        order derivatives.    -   E_(quad)=ΣΔ₁ ²+Δ₂ ²+Δ₃ ² This term favors regular quad shapes in        the resulting control mesh. For each quad (see FIG. 20 ), Δ₁=δ₁        ²−δ₂ ², Δ₂=d₁ ²−d₂ ² and Δ₃=d₃ ²−d₄ ² may be defined. A possible        variant is Δ₂=d₁ ²−d₃ ² and Δ₃=d₂ ²−d₄ ². All these values can        be expressed analytically as functions of x.

Finally, the implementation of the method may also introduce an optionalenergy term that measures the global variation of the curvature (the sumof the squares of the partial derivatives of the main curvatures may beused):

$E_{{curvature}{variation}} = {\sum\left( {\frac{\partial c_{1}^{2}}{\partial u} + \frac{\partial c_{1}^{2}}{\partial v} + \frac{\partial c_{2}^{2}}{\partial u} + \frac{\partial c_{2}^{2}}{\partial v}} \right)}$

The optimization scheme may determine vertex coordinates x_(min) thatminimize the total EnergyE=E_(fit)+αE_(edges)+βE_(curvature)+γE_(quad)+δE_(curvature variation),where α, β, γ and δ are weight parameters, that can either be providedor else computed at the initial evaluation of the energy terms in orderto ensure specific ratios between the four terms. These ratios can beeither default values of the system or else user-provided.

Since E_(fit) uses discrete map functions E_(i), the implementation ofthe method may apply Sobel filters to generate maps that approximate thegradient of E_(i) and use these to analytically evaluate the Jacobianmatrix for E_(fit). The Jacobian matrices for the other energy terms maybe numerically approximated.

The implementation of the method may use a numerical optimization solver(e.g. Levenberg-Marquardt) to determine x_(min).

Since the implementation of the method does not have an explicitexpression of the silhouette, the implementation of the method may onlycompute a single minimization step per iteration, and then use theresulting vertex coordinates to update the control mesh. If the energyis sufficiently small, the process may be stopped and result in theupdated control mesh, otherwise the process is re-iterated (see FIG. 17).

Consequently, the silhouettes of the subdivision surface, based on theresulting control mesh, are an optimal fit to the contours found in theprovided images (see FIG. 21 ).

An additional benefit of the implementation of the method is that areasthat were not covered by silhouettes may usually be smoothed orflattened. For instance, the flat base of an object sitting or lying ona table may be poorly covered by the images, since such objects areusually photographed from above. Because of this, the carving maygenerate non-flat, possibly pointed areas, which may, however, beflattened by the method during the contour fitting phase (see FIG. 22 ).

If more information, e.g. planar areas, symmetry planes, etc., isavailable, it may be taken into account in the optimization scheme, i.e.either by constraining the positions of (some of) the control vertices,or, by directly reducing the number of variables. In case of identifiedsymmetry planes, the control vertices on one side of the symmetry planemay be constrained to be the mirror image of an identified controlvertex on the other side of the symmetry plane, thus reducing the numberof control vertices by approximately 50%. Control vertices in identifiedplanar areas may be defined by two parameters on the plane instead ofthree spatial coordinates. The same can be done for identified sphericalor cylindrical areas of the shape.

Examples of the optional smoothing of unfitted areas are now discussed.

As earlier-mentioned, not all areas of the resulting fitted subdivisionsurface are seen as silhouettes and thus are not fitted to anything. Itis therefore possible that the surface is locally less smooth in theseareas.

The examples may attempt to smooth these areas by performing apost-processing phase that consists in minimizing an energy that iscomposed of the terms E_(edges), E_(curvature), E_(quad),E_(curvature variation), while maintaining a set of constraints C_(fix).

The first four terms have been discussed earlier. C_(fix) represents theconstraints that keeps each point of the surface that is on a silhouetteat its original position, which is the position reached before theoptional smoothing, effectively constraining the form to stick to itsoriginal shape in those areas.

All four smoothing terms, E_(edges), E_(curvature), E_(quad),E_(curvature variation), use non-uniform weights to reduce their effecton areas that appear in silhouettes and increase their effect in areasnot covered by any silhouettes. While the task of determining how toweight the different terms with respect to one another is notstraightforward, it has been observed that using these examples of theimplementation of the method has further smoothed some remainingbumpiness in such areas.

The invention claimed is:
 1. A computer-implemented method for 3Dreconstruction, the method comprising: obtaining 2D images which allrepresent a same real object which is fixed, and, for each 2D image,camera parameters which define a perspective projection; obtaining, foreach 2D image, a smooth map, the smooth map having pixel values eachrepresenting a measurement of contour presence, the contour being alocation of separation between two different textures of the 2D image;and determining a 3D modeled object that represents the real object, thedetermining iteratively optimizing energy that rewards, for each smoothmap, projections of silhouette vertices of the 3D modeled object havingpixel values, on the smooth map, representing a high measurement ofcontour presence, wherein the energy includes a term of a type:$E_{fit} = {\sum\limits_{i,j}{E_{i}\left( {\pi_{i}\left( s_{ij} \right)} \right)}^{2}}$where for a 2D image i: Σ_(i)(⋅) denotes the smooth map, s_(ij) denotesa silhouette point j, and π_(i)(⋅) denotes a projection transformation.2. The method of claim 1, wherein the smooth map is a function of acontour probability map.
 3. The method of claim 2, wherein the functionis a smoothing of an affine mapping.
 4. The method of claim 3, whereinthe smoothing further includes at least one application of a Gaussianblur to the contour probability map, or a convolution of the contourprobability map with a kernel obtained from a Laplace distribution. 5.The method of claim 4, wherein the smoothing further includesdetermining an envelope of application of a family of Gaussian blurs tothe contour probability map, each Gaussian blur having a differentkernel size.
 6. The method of claim 2, wherein the function includes atleast one application of a Gaussian blur to the contour probability map,or a convolution of the contour probability map with a kernel obtainedfrom a Laplace distribution.
 7. The method of claim 1, wherein the 3Dmodeled object is a control mesh of a subdivision surface.
 8. The methodof claim 7, wherein the method further comprises, at each iteration ofthe optimizing: obtaining a current control mesh; subdividing thecurrent control mesh into a subdivided mesh; for each 2D image:projecting the subdivided mesh on the 2D image, computing a 2Dsilhouette of the 3D modeled object in the 2D image, and identifyingpoints of the subdivided mesh corresponding to the 2D silhouette, as thesilhouette vertices, and modifying the current control mesh to reducethe energy.
 9. The method of claim 7, wherein the energy furtherrewards: lowness of a sum of squares of lengths of all edges in thecontrol mesh, lowness of a sum of squares of principal curvature valuesat densely sampled points of a limit surface of the control mesh, and/orregularity of faces of the control mesh.
 10. A non-transitory computerreadable storage medium having recorded thereon a computer program thatwhen executed by a computer causes the computer to implement a methodfor 3D reconstruction, the method comprising: obtaining 2D images whichall represent a same real object which is fixed, and, for each 2D image,camera parameters which define a perspective projection; obtaining, foreach 2D image, a smooth map, the smooth map having pixel values eachrepresenting a measurement of contour presence, the contour being alocation of separation between two different textures of the 2D image;and determining a 3D modeled object that represents the real object, thedetermining iteratively optimizing energy that rewards, for each smoothmap, projections of silhouette vertices of the 3D modeled object havingpixel values, on the smooth map, representing a high measurement ofcontour presence, wherein the energy includes a term of a type:$E_{fit} = {\sum\limits_{i,j}{E_{i}\left( {\pi_{i}\left( s_{ij} \right)} \right)}^{2}}$where for a 2D image i: E_(i)(⋅) denotes the smooth map, s_(ij) denotesa silhouette point j, and π_(i)(⋅) denotes a projection transformation.11. A system comprising: a processor coupled to a memory and a graphicaluser interface, the memory having recorded thereon a computer programfor 3D reconstruction that when executed by the processor causes theprocessor to be configured to: obtain 2D images which all represent asame real object which is fixed, and, for each 2D image, cameraparameters which define a perspective projection, obtain, for each 2Dimage, a smooth map, the smooth map having pixel values eachrepresenting a measurement of contour presence, the contour being alocation of separation between two different textures of the 2D image,and determine a 3D modeled object that represents the real object, thedetermining iteratively optimizing energy that rewards, for each smoothmap, projections of silhouette vertices of the 3D modeled object havingpixel values, on the smooth map, representing a high measurement ofcontour presence, wherein the energy includes a term of a type:$E_{fit} = {\sum\limits_{i,j}{E_{i}\left( {\pi_{i}\left( s_{ij} \right)} \right)}^{2}}$where for a 2D image i: E_(i)(⋅) denotes the smooth map, s_(ij) denotesa silhouette point j, and π_(i)(⋅) denotes a projection transformation.